3.2.77 \(\int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx\) [177]

Optimal. Leaf size=25 \[ -\frac {b (b \tan (e+f x))^{-1+n}}{f (1-n)} \]

[Out]

-b*(b*tan(f*x+e))^(-1+n)/f/(1-n)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2671, 30} \begin {gather*} -\frac {b (b \tan (e+f x))^{n-1}}{f (1-n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^2*(b*Tan[e + f*x])^n,x]

[Out]

-((b*(b*Tan[e + f*x])^(-1 + n))/(f*(1 - n)))

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2671

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> With[{ff = FreeFactors[Ta
n[e + f*x], x]}, Dist[b*(ff/f), Subst[Int[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, b*(Tan[e + f*x]/ff
)], x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx &=\frac {b \text {Subst}\left (\int x^{-2+n} \, dx,x,b \tan (e+f x)\right )}{f}\\ &=-\frac {b (b \tan (e+f x))^{-1+n}}{f (1-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 22, normalized size = 0.88 \begin {gather*} \frac {b (b \tan (e+f x))^{-1+n}}{f (-1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^2*(b*Tan[e + f*x])^n,x]

[Out]

(b*(b*Tan[e + f*x])^(-1 + n))/(f*(-1 + n))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.76, size = 1782, normalized size = 71.28

method result size
risch \(\text {Expression too large to display}\) \(1782\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^2*(b*tan(f*x+e))^n,x,method=_RETURNVERBOSE)

[Out]

I/(-1+n)/f/(exp(2*I*(f*x+e))-1)*(1/((exp(2*I*(f*x+e))+1)^n)*(exp(2*I*(f*x+e))-1)^n*b^n*exp(1/2*I*n*Pi*csgn(I/(
exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1)*b)*csgn(1/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e)
)-b/(exp(2*I*(f*x+e))+1))^2)*exp(-1/2*I*n*Pi*csgn(1/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-b/(exp(2*I*(f*x+e)
)+1))^3)*exp(1/2*I*n*Pi*csgn(1/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-b/(exp(2*I*(f*x+e))+1))^2)*exp(-1/2*I*n
*Pi*csgn(I/(exp(2*I*(f*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))*csgn(I*exp(2*I*(f*x+e))-I)*csgn(I/(ex
p(2*I*(f*x+e))+1)))*exp(-1/2*I*n*Pi*csgn(I/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1)*b)*c
sgn(1/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-b/(exp(2*I*(f*x+e))+1)))*exp(-1/2*I*Pi*n)*exp(1/2*I*n*Pi*csgn(I/
(exp(2*I*(f*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))^2*csgn(I/(exp(2*I*(f*x+e))+1)))*exp(1/2*I*n*Pi*c
sgn(I/(exp(2*I*(f*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))*csgn(I/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x
+e))-I/(exp(2*I*(f*x+e))+1)*b)^2)*exp(-1/2*I*n*Pi*csgn(I/(exp(2*I*(f*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x
+e))+1))*csgn(I/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1)*b)*csgn(I*b))*exp(-1/2*I*n*Pi*c
sgn(I/(exp(2*I*(f*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))^3)*exp(1/2*I*n*Pi*csgn(I/(exp(2*I*(f*x+e))
+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))^2*csgn(I*exp(2*I*(f*x+e))-I))*exp(-1/2*I*n*Pi*csgn(I/(exp(2*I*(f*
x+e))+1)*b*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1)*b)^3)*exp(1/2*I*n*Pi*csgn(I/(exp(2*I*(f*x+e))+1)*b*exp(2*I*
(f*x+e))-I/(exp(2*I*(f*x+e))+1)*b)^2*csgn(I*b))*exp(2*I*f*x)*exp(2*I*e)+1/((exp(2*I*(f*x+e))+1)^n)*(exp(2*I*(f
*x+e))-1)^n*b^n*exp(-1/2*I*Pi*n*(csgn(I/(exp(2*I*(f*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))^3-csgn(I
/(exp(2*I*(f*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))^2*csgn(I*exp(2*I*(f*x+e))-I)-csgn(I/(exp(2*I*(f
*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))*csgn(I/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-I/(exp(2*I*(
f*x+e))+1)*b)^2+csgn(I/(exp(2*I*(f*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))*csgn(I/(exp(2*I*(f*x+e))+
1)*b*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1)*b)*csgn(I*b)-csgn(I/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-I/(ex
p(2*I*(f*x+e))+1)*b)^2*csgn(I*b)-csgn(I/(exp(2*I*(f*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))^2*csgn(I
/(exp(2*I*(f*x+e))+1))+csgn(I/(exp(2*I*(f*x+e))+1)*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1))*csgn(I*exp(2*I*(f*
x+e))-I)*csgn(I/(exp(2*I*(f*x+e))+1))+csgn(I/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1)*b)
^3-csgn(I/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1)*b)*csgn(1/(exp(2*I*(f*x+e))+1)*b*exp(
2*I*(f*x+e))-b/(exp(2*I*(f*x+e))+1))^2+csgn(1/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-b/(exp(2*I*(f*x+e))+1))^
3+csgn(I/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-I/(exp(2*I*(f*x+e))+1)*b)*csgn(1/(exp(2*I*(f*x+e))+1)*b*exp(2
*I*(f*x+e))-b/(exp(2*I*(f*x+e))+1))-csgn(1/(exp(2*I*(f*x+e))+1)*b*exp(2*I*(f*x+e))-b/(exp(2*I*(f*x+e))+1))^2+1
)))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 30, normalized size = 1.20 \begin {gather*} \frac {b^{n} \tan \left (f x + e\right )^{n}}{f {\left (n - 1\right )} \tan \left (f x + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(b*tan(f*x+e))^n,x, algorithm="maxima")

[Out]

b^n*tan(f*x + e)^n/(f*(n - 1)*tan(f*x + e))

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 46, normalized size = 1.84 \begin {gather*} \frac {\left (\frac {b \sin \left (f x + e\right )}{\cos \left (f x + e\right )}\right )^{n} \cos \left (f x + e\right )}{{\left (f n - f\right )} \sin \left (f x + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(b*tan(f*x+e))^n,x, algorithm="fricas")

[Out]

(b*sin(f*x + e)/cos(f*x + e))^n*cos(f*x + e)/((f*n - f)*sin(f*x + e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (b \tan {\left (e + f x \right )}\right )^{n} \csc ^{2}{\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**2*(b*tan(f*x+e))**n,x)

[Out]

Integral((b*tan(e + f*x))**n*csc(e + f*x)**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(b*tan(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((b*tan(f*x + e))^n*csc(f*x + e)^2, x)

________________________________________________________________________________________

Mupad [B]
time = 2.62, size = 53, normalized size = 2.12 \begin {gather*} -\frac {\sin \left (2\,e+2\,f\,x\right )\,{\left (\frac {b\,\sin \left (2\,e+2\,f\,x\right )}{2\,{\cos \left (e+f\,x\right )}^2}\right )}^n}{2\,f\,\left ({\cos \left (e+f\,x\right )}^2-1\right )\,\left (n-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*tan(e + f*x))^n/sin(e + f*x)^2,x)

[Out]

-(sin(2*e + 2*f*x)*((b*sin(2*e + 2*f*x))/(2*cos(e + f*x)^2))^n)/(2*f*(cos(e + f*x)^2 - 1)*(n - 1))

________________________________________________________________________________________